package com.aaa.mapper;

import com.aaa.entity.OmsOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper extends BaseMapper<OmsOrder> {
    List<Map<String, Object>> selectOrder(Integer id);

    Integer removeOrProduct(String order_sn);

    Integer removeOrderId(@Param("id") Integer id,@Param("order_sn")String order_sn);

    Integer updState(String out_trade_no);

    Integer addOrder(@Param("id") String id,@Param("order_sn") String orderid2,@Param("username") String username,@Param("address") String address,@Param("name") String name,@Param("phone") String phone,@Param("price") String countPrice);

    Map<String, Object> selectOrderByOrderId(String orderid2);

    Map<String, Object> selectCartByOrderId(String s);

    Integer addOrderItem(@Param("oid")String oid,@Param("order_sn") String order_sn,@Param("product_id") Object product_id,@Param("product_name") Object product_name,@Param("price") Object price,@Param("quantity") Object quantity);

    Integer removeCartById(String s);

    List<Map<String, Object>> selectOrderById(String id);

    Integer removeByOrderSn(String order_sn);
}
